#parse argument

architecture=$1
matrix_decompressed_file=$2
matrix_comp_file=$3
output_dir=$4
lorem_ipsum_file=$5

permutation_str=""

# TODO add different encoding paramethers

str="
 xrnlib-cli \
    --encoding-conf -compiled-param -no-password  \
    --permutation-conf -arch 256 \
    --split-symmetric -plain-text $lorem_ipsum_file -solution-text $output_dir/solution.xf \
    -challenge-text $output_dir/challenge.xf 
"
echo ""; echo $str; echo ""
eval $str


str="
xrnlib-cli \
    --decoding-conf -compiled-param -no-password  \
    --permutation-conf -arch 256 \
    --join-symmetric -plain-text $output_dir/lorem_ipsum_joined.txt -solution-text $output_dir/solution.xf
    -challenge-text $output_dir/challenge.xf
"

echo ""; echo $str; echo ""
eval $str


str=" 
cmp --silent $output_dir/lorem_ipsum_joined.txt $lorem_ipsum_file && echo 'PASS' || echo 'FAIL'
"
echo ""; echo $str; echo ""
eval $str
